package com.zerui.manager.device.gateway;

import com.zerui.manager.device.Device;
import com.zerui.manager.device.custom.DeviceCustom;
import com.zerui.manager.web.cmd.DeviceOperateDoorCmd;

import java.sql.Time;
import java.util.List;
import java.util.Set;

/**
 * @Author wh
 * @create_time 2023-08-25 9:05
 */
public interface DeviceGateWay {

    List<Device> selectByDeviceIds(Set<Long> deviceList);
    
    List<DeviceCustom> selectByDeviceIds2(Set<Long> deviceIds);

    Device getByDeviceId(Long id);

    void update(Device device);

    void add(Device device);

    void invokeIoTCommandBatch(DeviceOperateDoorCmd deviceOperateDoorCmd);

    void invokeICCCommandBatch(DeviceOperateDoorCmd deviceOperateDoorCmd);

    void deleteById(Long deviceId);

	void updateByDeviceId(Device device);

    // IoT设备常开/常闭功能
    void iotDeviceAutoOpenEnable(Device device);

    // ICC设备常开/常闭功能
    void iccDeviceAutoOpenEnable(Device device);

	List<Device> selectDeviceCurfewTimeStart(Time startTime, Time endTime, Integer accessStatus);

    List<DeviceCustom> selectDeviceCurfewTimeStart2(Time startTime, Time endTime, Integer accessStatus);

	List<Device> selectDeviceCurfewTimeEnd(Time startTime, Time endTime, Integer accessStatus);

    List<DeviceCustom> selectDeviceCurfewTimeEnd2(Time startTime, Time endTime, Integer accessStatus);

}
